<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 和indexOf(-1) 效果差不多



        // includes  判断数组当中 是否 存在 这个元素
        // 存在 返回 true
        // 不存在 返回 false
        var arr = ["a", "b", "c", "d", "e", "d", "c"];
        console.log(arr.includes("f")); // false
        console.log(arr.includes("d")); // true

        console.log(arr.includes("b")); // true
        // 从索引为2  开始 搜索
        console.log(arr.includes("b", 2)); // false
    </script>
    </script>
</body>

</html>